<admintpl file="header" />
<style type="text/css">
	.pic-list li {
		margin-bottom: 5px;
	}
</style>
</head>
<body>
<div class="wrap js-check-wrap">
	<ul class="nav nav-tabs">
		<li ><a href="{:U('indexadmin/index')}">{:L('USER_INDEXADMIN_INDEX')}</a></li>
		<li class="active"><a href="{:U('indexadmin/add')}">添加用户</a></li>
	</ul>
	<form action="{:U('indexadmin/add_post')}" method="post" class="form-horizontal js-ajax-forms" enctype="multipart/form-data">
		<div class="row-fluid">
			<div class="span9">
				<table class="table table-bordered">
					<!--<tr>-->
						<!--<th>用户名</th>-->
						<!--<td><input type="text" name="user_login" id="user_login" value="{$item.user_login}" style="width: 400px" placeholder="请输入用户名"> </td>-->
					<!--</tr>-->
					<tr>
						<th>用户名</th>
						<td><input type="text" name="user_nicename" id="user_nicename" value="{$item.user_nicename}" style="width: 400px" placeholder="请输入昵称"> </td>
					</tr>
					<tr>
						<th>邮箱地址</th>
						<td><input type="text" name="user_email" id="user_email" value="{$item.user_email}" style="width: 400px" placeholder="请输入邮箱地址"> </td>
					</tr>
					<tr>
						<th>密码</th>
						<td><input type="text" name="user_pass" id="user_pass" value="" style="width: 400px" placeholder="请输入密码"> </td>
					</tr>
					<tr>
						<th>性别</th>
						<td>
							<input name="sex" type="radio" value="1" <if condition="$item.sex == 1">checked</if>/>&nbsp;男&nbsp;&nbsp;
							<input name="sex" type="radio" value="2"  <if condition="$item.sex == 2">checked</if> />&nbsp;女
						</td>
					</tr>
                    <tr>
                        <th>手机号</th>
                        <td><input type="text" name="mobile" id="mobile" value="{$item.mobile}" style="width: 400px" placeholder="请输入手机号"> </td>
                        </td>
                    </tr>
					<tr>
						<th>余额</th>
						<td><input type="text" name="balance" id="balance" value="{$item.balance}" style="width: 400px" placeholder="请输入手机号"> </td>
						</td>
					</tr>
					<tr>
						<th>积分</th>
						<td><input type="text" name="score" id="score" value="{$item.score}" style="width: 400px" placeholder="请输入手机号"> </td>
						</td>
					</tr>
					<tr>
						<th>是否启用</th>
						<td>
							<input name="user_status" type="radio" value="1" <if condition="$item.user_status == 1">checked</if>/>&nbsp;是&nbsp;&nbsp;
							<input name="user_status" type="radio" value="2"  <if condition="$item.user_status == 2">checked</if> />&nbsp;否
						</td>
					</tr>
					<tr>
						<th>是否开启VIP</th>
						<td>
							<input name="is_vip" type="radio" value="1" <if condition="$item['is_vip'] == 1">checked</if>/>&nbsp;是&nbsp;&nbsp;
							<input name="is_vip" type="radio" value="-1"  <if condition="$item['is_vip'] == -1">checked</if> />&nbsp;否
						</td>
					</tr>

					<tr>
						<th><b>头像</b></th>

						<td>
							<div style="text-align: left;">
								<input type="hidden" name="avatar" id="avatar" value="{$item.avatar}">
								<a href="javascript:upload_one_image('图片上传','#avatar');">
									<if condition="empty($item['avatar'])">
										<img src="__TMPL__Public/assets/images/default-thumbnail.png" id="avatar-preview" width="135" style="cursor: hand"/>
										<else />
										<img src="{:sp_get_image_preview_url($item['avatar'])}" id="avatar-preview" width="135" style="cursor: hand"/>
									</if>
								</a>
								<input type="button" class="btn btn-small" onclick="$('#thumb-preview').attr('src','__TMPL__Public/assets/images/default-thumbnail.png');$('#avatar').val('');return false;" value="取消图片">
							</div>
						</td>
					</tr>


				</table>
			</div>

		</div>
		<div class="form-actions">
			<input type="hidden" name="id" value="{$item.id}"/>
			<button class="btn btn-primary js-ajax-submit" type="submit">提交</button>
			<a class="btn" href="{:U('indexadmin/index')}">返回</a>
		</div>
	</form>
</div>
<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>

</body>
</html>